/*
 * @Author: wangyongcun
 * @Date: 2023-02-21 19:53:05
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-06-08 18:38:56
 * @Description: 场地管理-接口定义和函数集合
 */
import { Request } from "@/utils/axios";

// ** 表头定义
export const tableColumn = [
  {
    prop: "addressName",
    label: "场地名称",
    minWidth: "180",
  },
  {
    prop: "addressTypeName",
    label: "场地类型名称",
    minWidth: "180",
  },
  {
    prop: "longitude",
    label: "经度",
    minWidth: "180",
  },
  {
    prop: "latitude",
    label: "纬度",
    minWidth: "180",
  },
  {
    prop: "createTime",
    label: "操作时间",
    minWidth: "180",
  }
];

/**
 * @description: 添加类型
 * @param {*} params
 * @return {*}
 */
export const addRequest = async (params) => {
  return Request.post("/teaching-business/address/addAddress", params, {
    headers: {
      autoTip: "fail",
    },
  });
};

/**
 * @description: 更新
 * @param {*} params
 * @return {*}
 */
export const updateRequest = async (params) => {
  return Request.post("/teaching-business/address/updateAddress", params, {
    headers: {
      autoTip: "fail",
    },
  });
};

/**
 * @description: 删除
 * @param {*} params
 * @return {*}
 */
export const deleteRequest = async (params) => {
  return Request.post("/teaching-business/address/deleteAddress", params, {
    headers: {
      autoTip: "fail",
    },
  });
};

/**
 * @description: 获取列表
 * @param {*} params
 * @return {*}
 */
export const queryListRequest = async (params) => {
  return Request.get("/teaching-business/address/queryAllAddress", { params }, {
    headers: {
      autoTip: "fail",
    },
  });
};
